interface Add {
    add():number;
}

class Ts_class implements Add{
    protected x:number;
    protected y:number;

    constructor(x:number, y:number) {
        this.x = x;
        this.y = y;
    }

    add(): number {
        return this.x + this.y;
    }
}

class X extends Ts_class {
    xx():number {
        return this.x * this.y;
    }
}

let add: Ts_class = new Ts_class(2,5);
console.log(add.add());

let x: X = new X(2,5);
console.log(x.xx());

